﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_HeThong_ChucNang : System.Web.UI.Page
{
    ChucNangINFO info = new ChucNangINFO();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //List<PageGroupINFO> group = PageGroupDAL.listAll();
            //drlGroup.DataSource = group;
            //drlGroup.DataTextField = "vName";
            //drlGroup.DataValueField = "iSTTCode";
            //drlGroup.DataBind();
            //drlGroup.SelectedIndex = 0;
            //NapDuLieu();
            //setpagegroup(group);
        }
    }
    protected void grvbangGiaCan_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        //grvbangGiaCan.PageIndex = e.NewPageIndex;
        //NapDuLieu();

    }
    private void NapDuLieu()
    {
        
    }
    protected void btnReload_Click(object sender, EventArgs e)
    {
        NapDuLieu();
    }
    protected void drlTrangXem_SelectedIndexChanged(object sender, EventArgs e)
    {
        //try
        //{
        //    grvbangGiaCan.PageSize = Convert.ToInt32(drlTrangXem.SelectedItem.Text);
        //    Session["pagingPages"] = Convert.ToInt32(drlTrangXem.SelectedItem.Text);
        //}
        //catch
        //{

        //    grvbangGiaCan.PageSize = 10;
        //}
        //NapDuLieu();
    }

    protected void setpagegroup()
    {
        //ltPageGroup
        //StringBuilder sb = new StringBuilder();
        //StringBuilder sb1 = new StringBuilder();
        //for (int i = 0; i < group.Count; i++)
        //{
        //    sb.Append("<option value='" + group[i].iSTTCode + "'>" + group[i].vName + "</option>");
        //    if (!group[i].vPath.Equals(""))
        //    {
        //        group[i].vPath = group[i].vPath.Replace("..", "Admin");
        //        group[i].vPath = group[i].vPath.Substring(0, group[i].vPath.Length - 1);
        //        sb1.Append("<li class='clsliTT'  style='padding:5px;outline:none;'>");
        //        sb1.Append("<a class='clsThongTin_' style='height:40px; padding:10px 0px 10px 30px;' href='#' rel='" + group[i].vPath + "'>" + group[i].vName + "</a>");
        //        sb1.Append("<ul style='margin-top:10px; width:100%;'></ul></li>");
        //    }
        //}
        //ltPageGroup.Text = sb.ToString();
        //ltfolderbrowser.Text = sb1.ToString();

        //DirectoryInfo info = new DirectoryInfo(Server.MapPath("~/Admin/AJAX_XULY"));
        //DirectoryInfo[] dr = info.GetDirectories();
        //sb1 = new StringBuilder();
        //foreach (var item in dr)
        //{
        //    sb1.Append("<li class='clsliTT'  style='padding:5px;outline:none;'><span class='glyphicon glyphicon-folder-close'></span>");
        //    sb1.Append("<a class='clsThongTin_' style='height:40px; padding:10px 0px 10px 20px;' href='#' rel='" + item.Name + "'>" + item.Name + "</a>");
        //    sb1.Append("<ul style='margin-top:10px; width:100%;'></ul></li>");
        //}
        //FileInfo[] files = info.GetFiles("*.aspx");
        //foreach (var item in files)
        //{
        //    sb1.Append("<li class='line_ur' style='margin: 0; padding:5px 0px 5px 10px;' rel='" + item.Name + "'><span class='glyphicon glyphicon-file'></span>");
        //    sb1.Append("<span style='padding:0px 10px;'>" + item.Name + "</span>");
        //    sb1.Append("</li>");
        //}

        //ltfolderbrowserAjax.Text = sb1.ToString();
    }
}